#! /bin/sh

name=libxkbcommon
version=1.9.1
revision=1
git_url="https://github.com/xkbcommon/libxkbcommon.git"
commit=7df431ac4d0d36639876318a4c69198b03ee50ba
imagedeps="git meson ninja-build"
hostdeps="gcc pkg-config"
deps="core-libs libxcb libxml xkeyboard-config"

configure() {
    meson_configure \
        -Dxkb-config-root="$prefix"/share/X11/xkb \
        -Denable-x11=true \
        -Denable-wayland=false
}

build() {
    ninja -j${parallelism}
}

package() {
    DESTDIR="${dest_dir}" ninja install

    mkdir -p "${dest_dir}${prefix}/share/X11/xkb"
    touch "${dest_dir}${prefix}/share/X11/xkb/.keep"

    post_package_strip
}
